1. Field of the Invention
The present invention relates to the testing of microprocessors. It more specifically relates to a method and device of digital data transmission between a monitoring circuit integrated in a microprocessor chip and an analysis tool.
2. Discussion of the Related Art
FIG. 1 schematically shows an integrated circuit 10 comprising a microprocessor (μP) 12, an internal memory (MEM) 14, and input/output terminals (I/O) 16. Microprocessor 12 is intended to execute a program or a software stored in memory 14. Under control of the program, microprocessor 12 may process data provided by input/output terminals 16 or stored in memory 14 and read or write data through input/output terminals 16.
To check the proper operation of the microprocessor, a monitoring circuit 18 (TEST) is generally integrated with integrated circuit 10. Monitoring circuit 18 is capable of reading specific data provided by microprocessor 12 on execution of a program, and of possibly processing the read data. Test terminals 22 connect monitoring circuit 18 to an analysis tool 24. Analysis tool 24 may process the received signals, for example, according to commands provided by a user, and ensure a detailed analysis of the operation of microprocessor 12. In particular, analysis tool 24 may determine the program instruction sequence really executed by microprocessor 12.
The number of test terminals 22 may be on the same order of magnitude as the number of input/output terminals 16, for example, from 200 to 400 terminals. Test terminals 22 as well as the connections of monitoring circuit 18 take up a significant silicon surface area, which causes an unwanted increase in the circuit cost. For this purpose, a first version of integrated circuit 10 comprising monitoring circuit 18 and test terminals 22 is produced in small quantities to debug the program of microprocessor 12 or “user program”. After this debugging, a version of integrated circuit 10 rid of monitoring circuit 18 and of test terminals 22 is sold. This requires the forming of two versions of the integrated circuit, which requires a significant amount of work and is relatively expensive. Further, the final chip is not necessarily identical to the tested chip.
To overcome the above-mentioned disadvantages, it is desired to form a monitoring circuit 18 which takes up a reduced surface area and only requires a reduced number of test terminals 22, which decreases the selfcost of the monitoring circuit. Monitoring circuit 18 can then be left on the finally sold integrated circuit 10.
It is thus desired to decrease the number of signals provided by monitoring circuit 18. For this purpose, certain logic operations are directly performed at the level of monitoring circuit 18 on the data measured at the level of microprocessor 12 to only transmit messages having an important information content.
Thus, standard IEEE-ISTO-5001 in preparation provides in its 1999 version a specific message exchange protocol between a monitoring circuit and an analysis tool for a monitoring circuit 18 requiring but a reduced number of test terminals 22.
Among the messages provided by monitoring circuit 18 according to standard IEEE-ISTO-5001, program tracing messages and data messages are distinguished. Program tracing messages provide information relative to the order of execution of the program by microprocessor 12. It may, for examples, be a message indicating that a jump has occurred in the program executed by microprocessor 12. Data messages correspond to the other messages provided by monitoring circuit 18 and especially provide information relative the data processed by the microprocessor. It may be a message representative of a data read or write operation in an area of memory 14.
Based on the program tracing messages transmitted by monitoring circuit 18, analysis tool 24 attempts to reconstitute the instruction sequence executed by microprocessor 12. The reconstituted instruction sequence can then be compared to an instruction sequence theoretically executed by microprocessor 12 to determine malfunctions of microprocessor 12.
When monitoring circuit 18 transmits to analysis tool 24 the program tracing and data messages altogether, analysis tool 24 generally can assign to each received message a specific instruction of the program by means of adapted algorithms. However, to avoid for the data transmission frequency of monitoring circuit 18 to exceed the passband imposed by the technologies used to form the intermediary elements between monitoring circuit 18 and test terminals 22, that is, to avoid saturation of monitoring circuit 18, only some of the messages provided by standard IEEE-ISTO-5001 are generally transmitted on a same program portion. For example, only the read operations concerning a specific area of memory 14 may be subject to the message transmission to analysis tool 24. In such an example, when analysis tool 24 successively receives several data messages between two program tracing messages, it may be difficult to have a specific program instruction correspond to each received data message if, between the two program instructions corresponding to the two program tracing messages, there exist a significant number of instructions from which the received data messages can originate. The establishing of correspondences is more difficult still, or even impossible in certain cases, for example when an indirect addressing mode is used. An example of use of an indirect addressing mode corresponds to an operation of reading or writing of data associated with a program instruction which does not explicitly comprise the address of a register of the memory into or from which the data must be written or read, but which comprises the address of a register in which is stored the address of the memory register into or from which the data must be written or read. In the case where several program instructions associated with a read or write operation are neighbors and refer to the same register, it can then be difficult, or even impossible, to establish the correspondence between the received messages and the corresponding instructions.
Standard IEEE-ISTO-5001 also provides periodic transmission of a specific program tracing message called the synchronization message comprising the complete address of the instruction just executed by microprocessor 12 at the time when the synchronization message has been generated by monitoring circuit 18. The synchronization messages enable analysis tool 24 to check that it is performing a correct correlation between the received messages and the program instructions executed by microprocessor 12, and if not, adjusting the correlation. A synchronization message is also punctually transmitted when monitoring circuit 18 starts the transmission of messages to analysis tool 24 or interrupts it.
A possibility to ease the correlation between messages received by analysis tool 24 and program instructions would consist of transmitting a synchronization message with each data message. However, the coding of the complete address which is contained in a synchronization message requires a significant number of bits. The systematic use of synchronization messages would thus risk saturating monitoring circuit 18. Further, as already explained, synchronization messages have already been transmitted periodically or punctually to analysis tool 24 for other purposes. It would then be difficult for analysis tool 24 to make the difference between synchronization messages associated with data messages and synchronization messages periodically or punctually transmitted.